import React, { Component } from 'react';
import { connect } from 'react-redux';
import Top from './top/brandIntroduction_top';
import Banner from './banner/brandIntroduction_banner';
import Tab from './tab/brandIntroduction_tab';
import Content from './content/brandIntroduction_content';
import FootCon  from '../../component/footCon/footCon';
import { setRouterName } from '../../store/public/action';
import { setBrandIntroductionTab } from '../../store/brandIntroduction/action';
import './brandIntroduction.scss';

class BrandIntroduction extends Component {

    componentWillMount() {
        this.props.setRouterName(this.props.location.pathname, this.props.history)
        this.props.setBrandIntroductionTab(1);
    }

    render() {
        return (
            <div className="brandIntroduction">
                <Top></Top>
                <Banner></Banner>
                <Tab></Tab>
                <Content></Content>
                <FootCon></FootCon>
            </div>
        )
    }
}

const mapStateToProps = (state) => {
    return {
        state: state
    }
}

const mapDispatchToProps = {
    setBrandIntroductionTab: setBrandIntroductionTab,
    setRouterName: setRouterName
}

export default connect(mapStateToProps, mapDispatchToProps)(BrandIntroduction)